﻿using System;
using System.IO;

namespace DreamCube.Websites.UI
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            String systemID = Request.QueryString["systemID"];
            String systemConfigFilePath = Path.Combine(Server.MapPath("~"), @"Common\Configs\Systems.xml");
            if (BLL.WebSession.LoginSystem(systemConfigFilePath, systemID))
            {
                if (!String.IsNullOrEmpty(BLL.WebSession.CurrentSystem.IndexPage))
                {
                    Response.Redirect(BLL.WebSession.CurrentSystem.IndexPage);
                }
            }
        }
    }
}